package com.java2404.micro.order.openfeign;

import com.java2404.micro.common.entity.User;
import com.java2404.micro.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @User userlq
 * @Date 2025/1/7 14:21
 * @Classname UserService
 * @Description TODO
 */
@FeignClient(value = "micro-consumer", path = "/consumer") // 注册中心服务名
public interface UserService {

    /**
     * 根据用户 ID 查询用户信息
     *
     * @param userId 用户 ID
     * @return 用户信息
     */
    @GetMapping("/getUserById")
    Result<User> getUserById(@RequestParam("userId") Integer userId);
}
